<%@ page contentType="text/html; charset=GBK" %><%@ page import="java.util.*" %><%@ page import="com.ionglobal.db.*" %><%@ page import="com.ionglobal.lib.*" %><%@ page import="com.ionglobal.misc.*" %><%@ page import="com.dhec.ggs.*"%><%
DBI dbi = new DBI();
Request Request = new Request(request);
try{
	Map searchParam = new HashMap();
	String picno = Request.getString("datano");
	int data_0 = Request.getInt("data_0",0);//data_0{0:ͼֽ,1:HES,2:CATIA}
	int itype = data_0 + 2;//iType{2:ͼֽ,3:HES,4:CATIA}
	if(picno.length()>3){
		int iparentid = dbi.getRecordNum("select max(iParentId) from ggs_DataDispenseDetail where sDataNo='"+picno+"' and iType="+itype);
	
		if(iparentid>0){
			dbi.execQuery("select * from ggs_DataDispenseDetail where sDataNo='"+picno+"' and iParentId="+iparentid+" and iType="+itype);
			int count = 0;
			while(dbi.rsNext()){
					if(count==0)
						out.print(dbi.rsGetString("sName")+"|"+dbi.rsGetString("sDCNo"));
					out.print("|"+dbi.rsGetString("sDepartment")+"|"+dbi.rsGetString("iCount"));
					count++;
			}
			dbi.rsClose();
		}
	}
}catch(Exception e){
	e.printStackTrace();
}finally{
	dbi.closeAll();	
}
%>